Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go back to using curl to download snapshots #1347

Merged
merged 3 commits into from
Feb 25, 2015

Conversation

alexcrichton
Copy link
Member

We've had too many problems using urllib to make it worth it.

Closes #1346
Closes #1088
cc #1319 (using a proxy through curl)

@rust-highfive
Copy link

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)


with tarfile.open(dl_path) as tar:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

@alexcrichton alexcrichton force-pushed the no-more-urllib branch 2 times, most recently from 4fc34c4 to 8c0525c Compare February 24, 2015 23:44
@alexcrichton
Copy link
Member Author

@huonw ah good catch, updated to keep the relevant changes of aceba88.

@huonw
Copy link
Member

huonw commented Feb 25, 2015

@bors r+ 8c05

@bors
Copy link
Collaborator

bors commented Feb 25, 2015

⌛ Testing commit 8c0525c with merge caa5b60...

@alexcrichton alexcrichton reopened this Feb 25, 2015
bors added a commit that referenced this pull request Feb 25, 2015
We've had too many problems using urllib to make it worth it.

Closes #1346
Closes #1088
cc #1319 (using a proxy through curl)
@bors
Copy link
Collaborator

bors commented Feb 25, 2015

⌛ Testing commit 8c0525c with merge adafb16...

@bors
Copy link
Collaborator

bors commented Feb 25, 2015

💔 Test failed - cargo-win-64

@alexcrichton
Copy link
Member Author

@bors: retry force

@bors
Copy link
Collaborator

bors commented Feb 25, 2015

⚡ Previous build results are reusable. Rebuilding only cargo-win-64...

@bors
Copy link
Collaborator

bors commented Feb 25, 2015

☀️ Test successful - cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-32, cargo-win-64

@bors bors merged commit 8c0525c into rust-lang:master Feb 25, 2015
@alexcrichton alexcrichton deleted the no-more-urllib branch March 2, 2015 17:47
@retep998
Copy link
Member

retep998 commented Mar 3, 2015

This change back to curl has broken the downloading of snapshots for me on Windows using Msys2.

$ make
/mingw64/bin/python src/etc/dl-snapshot.py x86_64-pc-windows-gnu
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
Traceback (most recent call last):
  File "src/etc/dl-snapshot.py", line 75, in <module>
    raise Exception("failed to fetch url")
Exception: failed to fetch url
Makefile:90: recipe for target 'target/snapshot/bin/cargo.exe' failed
make: *** [target/snapshot/bin/cargo.exe] Error 1

@alexcrichton
Copy link
Member Author

Hm, do you have curl install specially? I'm curious why it doesn't have access to the same certificates that other msys2 installations do?

@bombless
Copy link

bombless commented Apr 4, 2015

Hmmm same issue as @retep998
I thought it was something wrong in my machine or something.

How did you fix it, @retep998 ?

FWIW, setting proxy on curl doesn't work for my MSYS2.
Not sure if it is about MSYS2 pacman tool/repository.

@retep998
Copy link
Member

retep998 commented Apr 4, 2015

I just manually edited the scripts to pass the -k option to curl. The problem is that with msys2, the msys2 curl works fine, but the mingw64 curl is broken, and to build cargo you need cmake and cmake depends on the mingw64 curl. You could also install an external cmake so you don't need the mingw64 curl installed.

@bombless
Copy link

bombless commented Apr 5, 2015

Thanks for the info, @retep998 !
Maybe we could use python urllib2 for Windows, and use curl for other systems.
I'll try make that happen by modifying this python script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

urllib2 error when installing Cargo cann't be built in msys2.
6 participants